<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <title>迷你酥 - 用户登录</title>
    <%@ include file="../site/jspf/head-tag.jspf" %>
        <link rel="stylesheet" href="<%=request.getContextPath()%>/static/talent/css/widget.css">
        <link rel="stylesheet" href="<%=request.getContextPath()%>/static/talent/css/login.css">
    </head>
    <body>
    	<div class="login_logo">
        	<a href="<%=request.getContextPath()%>/SiteServlet">
        		<img src="<%=request.getContextPath()%>/static/talent/image/i_login_log.png" alt="回到首页">
        	</a>
    	</div>
	    <div class="l_r_container">
			<!-- 快捷登录 -->
			<section id="login-box" class="ordinary_landing_box login_box">
		    	<a href="#" class="dialog_close"></a>
		    	<!-- 登录方式 -->
		   		<div class="ol_title clearfix">
			        <div class="ol_title_l f_left">
			            <a href="#" class="active">密码登录</a>
			        </div>
			        <div class="ol_title_r f_right">
			            <a href="<%=request.getContextPath()%>/TalentServlet?act=toRegisterPage" class="jump">注册</a>
			        </div>
		    	</div>
		    	<!-- 密码登录表单 -->
				<div class="ol_body email_login">
    				<form action="<%=request.getContextPath()%>/TalentServlet?act=login" onsubmit="return validateForm();" id="email-login" method="post">
    				<c:if test="${not empty errorInfo}">
	         			<p class="sys_err">${errorInfo}</p>
    				</c:if>
         			<ul>
			            <!-- 用户名 -->
			            <li class="clearfix">
			                <div class="user_name_box">
			                    <label for="username"></label>
			                    <input type="text" onblur="checkUsername()" value="admin" name="code" placeholder="请输入帐号" class="n_b p" id="username">
			                    <p id="usernameInfo" class="err none">请输入帐号</p>
			                </div>
			            </li>
			            <!-- 密码 -->
			            <li class="passw clearfix">
			                <div>
			                    <label for="password"></label>
			                    <input type="password" onblur="checkPassword()" value="admin" name="password" placeholder="输入6-14位密码，必须含数字和字母" class="p" id="password">
			                    <p id="passwordInfo" class="err none">请输入登录密码</p>
			        		</div>
						</li>
			        </ul>
			        <script>
                    	var username = document.getElementById("username");
                    	function checkUsername() {
                    		if(!username.value) {
                    			document.getElementById("usernameInfo").className = "err";
                    			return false;
                    		}
                    		return true;
                    	}
                    	var password = document.getElementById("password");
                    	function checkPassword() {
                    		if(!password.value) {
                    			document.getElementById("passwordInfo").className = "err";
                    			return false;
                    		}
                    		return true;
                    	}
						function validateForm() {
                    		return checkUsername() && checkPassword();
                    	}
                    </script>
			        <!-- 忘记密码 -->
			        <p class="agree">
			            <a class="" href="<%=request.getContextPath()%>/TalentServlet?act=toFindPasswordPage">忘记密码？</a>
			        </p>
			        <!-- 登录按钮 -->
			        <p class="mb15">
			            <input type="submit" value="登 录" class="auth_btn">
			        </p>
				</form>
			</div>
			<aside class="pass_login">
			 	<p class="f_line">
					<span>or</span>
			    </p>
			    <p class="other_method">
		            <a href="/connect/qq/" class="qq" target="_blank"><i></i></a>
		            <a href="/connect/weixin/" class="wx" target="_blank"><i></i></a>
		            <a href="/connect/weibo/" class="wb" target="_blank"><i></i></a>
		            <a href="/connect/baidu/" class="bd" target="_blank"><i></i></a>
			    </p>
			</aside>
		</section>
	<!-- 密码登录 -->
	</div>
	
    </body>
</html>